﻿<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="ImportFrm.aspx.vb" Inherits="ImportFrm" %>

<%@ Register Assembly="ISNet.WebUI.WebCombo" Namespace="ISNet.WebUI.WebCombo" TagPrefix="ISWebCombo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <link href="script/style.css" rel="stylesheet" />
    <script src="script/tinybox.js"></script>
    <script>
        function WebCombo1_OnAfterItemSelected(controlId) {

            var combo = ISGetObject("WebCombo1");
            var type_value = combo.Value

            if (type_value == "1") {

                document.getElementById("<%= FromVersionTxt.ClientID%>").value = "X01"

            } else if (type_value == "2") {
                document.getElementById("<%= FromVersionTxt.ClientID%>").value = "A01"
            } else if (type_value == "3") {
                document.getElementById("<%= FromVersionTxt.ClientID%>").value = "B01"
            } else if (type_value == "4") {
                document.getElementById("<%= FromVersionTxt.ClientID%>").value = "H01"
            }

        }
        function showwait() {
            var waitdiv = document.getElementById("loadingdiv");
            waitdiv.style.display = "block";
            var importbtn = document.getElementById("<%= SearhBtn.ClientID%>");
            importbtn.style.display = "none";
        }
        function popupwait() {
            TINY.box.show({ iframe: 'loading.html', boxid: 'frameless', close: 0, width: 300, height: 260, fixed: false, maskid: 'lightmask', maskopacity: 40, closejs: function () { closeJS() } });
            var importbtn = document.getElementById("<%= SearhBtn.ClientID%>");
            importbtn.style.display = "none";
        }
    </script>
    <asp:HiddenField ID="hd_err_txt" runat="server" />
    <div style="float: left; width: 98%; border: solid; border-color: gray; border-width: 1px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; box-shadow: 5px 5px 5px #808080; text-align: right; padding: 5px 5px 5px 5px;">
        <div style="text-align: right; margin-top: 5px;">
            <div align="left" style="width: 600px; float: left">
                <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>s
            </div>

            <div style="float: right;">
                &nbsp;&nbsp;&nbsp;&nbsp;<asp:ImageButton ID="SearhBtn" runat="server" ImageUrl="Icons/Import.png" ToolTip="Import ข้อมูล" OnClientClick="popupwait()" />



            </div>



        </div>
    </div>
    <div style="float: left; width: 98%">
        <center>
                  <div id="div1" runat="server" style=" width: 850px; border: solid; border-color: gray; border-width: 1px; margin-right: 10px; margin-top: 10px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; box-shadow: 5px 5px 5px #808080; height: 150px;">
               

                <table>
                    <tr><td colspan="3" align="left"><strong>ข้อกำหนดการจัดทำ</strong><br /><br /></td></tr>
                    <tr><td width="30px"></td><td align="left"><strong>ประเภทไฟล์</strong></td><td align="left"><strong>Target Version</strong></td><td align="left"><strong>ไฟล์ข้อมูล</strong></td></tr>
                    <tr>
                        <td width="30px"></td>
                         <td>
                            <table>
                                <tr>
                                    <td width="30px"></td>
                                    
                                     <td width="100px"> ประเภท</td>
                                     <td width="200px">
                                          <ISWebCombo:WebCombo ID="WebCombo1" Width="150px" runat="server" UseDefaultStyle="True" DataTextField="Description" DataValueField="Code" Height="20px" OnInitializeDataSource="WebCombo1_InitializeDataSource" AllowWildCardSearch="true">
                                            <LayoutSettings AlwaysShowAllRowsOnDropdown="true" AlwaysShowHelpButton="false" >
                                                 <ClientSideEvents OnAfterItemSelected="WebCombo1_OnAfterItemSelected" />
                                            </LayoutSettings>
                                        </ISWebCombo:WebCombo>
                                    <td width="30px"></td>
                                </tr>

                            </table>

                        </td>
                        <td>
                            <table>
                                <tr>
                                    <td width="30px"></td>
                                    <td width="30px">ปี</td>
                                     <td width="70px">
                                         <asp:TextBox ID="PlanYearsTxt" runat="server" ReadOnly="false" Width="40px"></asp:TextBox></td>
                                     <td width="50px"> Version</td>
                                     <td width="70px">
                                         <asp:TextBox ID="FromVersionTxt" runat="server" Width="40px"></asp:TextBox></td>
                                    <td width="30px"></td>
                                </tr>

                            </table>
                        </td>
                       
                        
                         <td>
                            <table>
                                <tr>
                                    <td width="30px"></td>
                                    
                                     <td width="50px"> ไฟล์</td>
                                     <td width="150px"><asp:FileUpload ID="FileUpload1" runat="server" Width="300px"   />
                                         </td>
                                    <td width="30px"></td>
                                </tr> 

                            </table>

                        </td>
                    </tr>
                    <tr><td colspan="3"><asp:CheckBox ID="CheckBox1" runat="server" Text="Auto สร้าง Fund Center , Commitment Item" ></asp:CheckBox></td></tr>
                   <tr><td colspan="4" align=center><asp:Button ID="Button1" runat="server"  Visible="false" Text="ดาวน์โหลดข้อมูลที่ผิดพลาด" /></td></tr>
                </table>
                </div> 
            <div id="loadingdiv" style="display:none;text-align:center;">
                     <img src="Images/loading.gif"/>
        <br /><p style="color:deeppink;font-size:20px;font-weight:bold">กรุณารอสักครู่</p>
                 </div>
            </center>
    </div>
    <asp:ScriptManager ID="Scriptmanager1" runat="server">
    </asp:ScriptManager>
    <%=AlertText%>
</asp:Content>

